﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RegisterationCommon.Common;
using RegisterationCommon.School;
using RegisterationCommon.Student;
using System.Data;

namespace RegisterationSystem.Space_Education
{
    public partial class student_manage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                switch (Request.Form["action"])
                {
                    case "del":
                        DelStus();
                        break;
                }
            }
        }

        //删除学生
        void DelStus()
        {
            //获取修改ID和学校ID
            string idlist = Request.Form["id"];
            string[] ids = idlist.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < ids.Length; i++)
            {
                if (!string.IsNullOrEmpty(ids[i].Trim()))
                {
                    DBAction.Delete("Students", "ID=" + ids[i].Trim());
                }
            }
        }
    }
}